package com.ruoyi.reservations.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.reservations.mapper.ReservationsMapper;
import com.ruoyi.reservations.domain.Reservations;
import com.ruoyi.reservations.service.IReservationsService;

/**
 * 图书预约Service业务层处理
 * 
 * @author anyunyi
 * @date 2025-05-28
 */
@Service
public class ReservationsServiceImpl implements IReservationsService 
{
    @Autowired
    private ReservationsMapper reservationsMapper;

    /**
     * 查询图书预约
     * 
     * @param id 图书预约主键
     * @return 图书预约
     */
    @Override
    public Reservations selectReservationsById(Long id)
    {
        return reservationsMapper.selectReservationsById(id);
    }

    /**
     * 查询图书预约列表
     * 
     * @param reservations 图书预约
     * @return 图书预约
     */
    @Override
    public List<Reservations> selectReservationsList(Reservations reservations)
    {
        return reservationsMapper.selectReservationsList(reservations);
    }

    /**
     * 新增图书预约
     * 
     * @param reservations 图书预约
     * @return 结果
     */
    @Override
    public int insertReservations(Reservations reservations)
    {
        return reservationsMapper.insertReservations(reservations);
    }

    /**
     * 修改图书预约
     * 
     * @param reservations 图书预约
     * @return 结果
     */
    @Override
    public int updateReservations(Reservations reservations)
    {
        return reservationsMapper.updateReservations(reservations);
    }

    /**
     * 批量删除图书预约
     * 
     * @param ids 需要删除的图书预约主键
     * @return 结果
     */
    @Override
    public int deleteReservationsByIds(Long[] ids)
    {
        return reservationsMapper.deleteReservationsByIds(ids);
    }

    /**
     * 删除图书预约信息
     * 
     * @param id 图书预约主键
     * @return 结果
     */
    @Override
    public int deleteReservationsById(Long id)
    {
        return reservationsMapper.deleteReservationsById(id);
    }
}
